from pathlib import Path
import xlrd
import os
import xlwt
import random
import xlutils
import lxml
import pandas as pd
from selenium import webdriver
import time
from bs4 import BeautifulSoup
import requests
from requests.cookies import RequestsCookieJar
import urllib3
import re
import threading

from urllib.request import urlretrieve

# from application.app.folder.file import cook
# from 图片 import jar
# import sys
# from sys import path
# path.append(0, sys.path[0]+'\\图片') #这里preprocess是split_by_date.py所在文件夹
# from .图片.split_by_date import pic-2





#设置最大线程锁
# thread_lock = threading.BoundedSemaphore(value=30)

try:
    i = 'https://aregsr.vip/forum.php?mod=attachment&aid=MzEyNTAxMzh8ZjI1YjY3MDh8MTYxNzQ1NDAwMnwxNjM2MDkyOTR8MTQ4NDczMzg%3D'
    # 自动登录
    drive = webdriver.Chrome()
    drive.get(i)
except:
    print('a')
# drive.find_element_by_id('goin').click()
# drive.find_element_by_id('ls_username').send_keys('ggfygg')
# drive.find_element_by_id('ls_password').send_keys('fhrAKMv@A4NXLkN')
# drive.find_element_by_class_name('mem_login').click()
# time.sleep(2)